//
//  TYZLabel.m
//  TYZ_SC
//
//  Created by 李贤立 on 2017/12/12.
//  Copyright © 2017年 Capfer. All rights reserved.
//

#import "TYZLabel.h"

@implementation TYZLabel
+ (instancetype)labelWithText:(NSString *)text {
    return [self labelWithText:text labelType:TYZLabelType_Default];
}
+ (instancetype)labelWithText:(NSString *)text labelType:(TYZLabelType)labelType {
    TYZLabel *label = [[TYZLabel alloc] init];
    label.text = text;
    switch (labelType) {
        case TYZLabelType_Default:
            label.font = [UIFont systemFontOfSize:CoreInfo.fontSize];
            label.textColor = TYZSameColor(51);
            break;
        case TYZLabelType_MainTitle:
            label.font = [UIFont boldSystemFontOfSize:CoreInfo.fontSize + 2];
            label.textColor = TYZSameColor(51);
            break;
        case TYZLabelType_DeatiTitle:
            label.font = [UIFont boldSystemFontOfSize:CoreInfo.fontSize];
            label.textColor = TYZSameColor(51 * 2);
            break;
        case TYZLabelType_ThirdTitle:
            label.font = [UIFont systemFontOfSize:CoreInfo.fontSize - 2];
            label.textColor = TYZSameColor(51 * 3);
            break;
        case TYZLabelType_FourTitle:
            label.font = [UIFont systemFontOfSize:CoreInfo.fontSize - 4];
            label.textColor = TYZSameColor(51 * 4);
            break;
        default:
            break;
    }
    return label;
}

@end
